<!doctype html>
<html lang="en">
<head>
    <title></title>
    <meta charset="utf-8">
    <meta name="keywords" content="IRU,新闻">
    <meta name="format-detection" content="telephone=no" />
    <link rel="stylesheet" href="__CDN__/assets/css/index/base.css"/>
    <link rel="stylesheet" href="__CDN__/assets/css/index/style1.css?v=<?php echo rand(10000,99999);?>"/>
    <script type="text/javascript" src="__CDN__/assets/js/index/jquery.1.11.3.js"></script>
    <script type="text/javascript" src="__CDN__/assets/js/index/viewportWidth.js"></script>
    <style>
        .recentNews_list{margin-top:0px;}
        .recentNews_list li span img{width:44px;height:42px;margin:30px 0 0 28px;}
    </style>
</head>
<body>
    <div class="index_box">
        <div class="index-top">
            <img src="__CDN__/assets/img/index/ATKearneyLogo.png" alt="" class="logo"/>
        </div>
		<input type="hidden" value="{$cid}" id="cid">
        
        <!--新闻列表-->
        <style>
        .news_list_box li{border-top: 2px solid #C2C2C2; border-bottom:none;}
        </style>
        <ul class='news_list_box' style="margin-top:0;overflow: scroll;">

             <div class="banner_box news_banner_box" style="margin-bottom:30px;"  onclick="document.location='/index/article/detail/aid/{$top.id}'">
                <img src="{$top.image}" alt="" class="banner"/>
                <div class="zhazhao"></div>
                <div class='banner_font'>{$top.title}</div>
            </div>
            <div class="liList_box">
				{foreach name="data" item="vo"}
				<li onclick="document.location='/index/article/detail/aid/{$vo.id}'">
					<img src="{$vo.image}" alt="" class='news_img'/>
					<p class='news_title'>{$vo.title}</p>
					<!--<p class='news_date'>{:date('Y年m月d日', $vo.updatetime)}</p>-->
					<!--<img src="__CDN__/assets/img/index/news_arrow.png" alt="" class='news_arrow'/>-->
				</li>
				{/foreach}
			</div>


        </ul>
    </div>
	<script>
		var cid = $('#cid').val();
		var falg = true;
		var page = 1;
		var ishave = true;
		$('.news_list_box').scroll(function(){
            if ($('.news_list_box').scrollTop() + $('.news_list_box').height() > $('.liList_box').height() && falg && ishave) {
                falg = !falg;
				$.post('/index/category/getListPage',{page:page,cid:cid},function(data){
				    if(!data){
				        ishave = false;
				        return;
                    }
				    for (var i in data) {
				       $('.liList_box').append('<li onclick="document.location=\'/index/article/detail/aid/'+data[i].id+'\'">' +
                           '<img src="'+data[i].image+'" alt="" class=\'news_img\'/>' +
                           '<p class=\'news_title\'>'+data[i].title+'</p>' +
                           // '<p class=\'news_date\'>'+getMyDate(data[i].updatetime*1000)+'</p>' +
                           // '<img src="__CDN__/assets/img/index/news_arrow.png" alt="" class=\'news_arrow\'/>' +
                           '</li>')
					}
                    falg = !falg;
                    page += 1;
				},'json')
			}
		})
        function getMyDate(str){
            var oDate = new Date(str),
                oYear = oDate.getFullYear(),
                oMonth = oDate.getMonth()+1,
                oDay = oDate.getDate(),
                oTime = oYear +'年'+ getzf(oMonth) +'月'+ getzf(oDay) +'日';//最后拼接时间
            return oTime;
        };
        //补0操作
        function getzf(num){
            if(parseInt(num) < 10){
                num = '0'+num;
            }
            return num;
        }
	</script>
</body>
</html>